﻿using BCEntity.TMS.Packing.PackingConfig;
using BCEntity.TMS.Packing.PackingConfigOverwrite;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.Packing.PackingConfig
{
    /// <summary>
    /// 包装材料配置重写
    /// </summary>
    public interface IPackingConfigOverwriteData
    {
        /// <summary>
        /// 获取包装材料配置记录
        /// </summary>
        /// <param name="agentRecordId">代理商Id</param>
        /// <param name="packingCategoryConfigId">包装材料分类配置Id</param>
        /// <param name="packingTitle">包装材料标题</param>
        /// <param name="provinceCode">省份编码</param>
        /// <param name="cityCode">市编码</param>
        /// <param name="countyCode">区县编码</param>
        /// <param name="enabled">是否启用</param>
        /// <param name="createStartDate">创建开始日期</param>
        /// <param name="createEndDate">创建结束日期</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        Task<(IEnumerable<PackingConfigOverwriteViewEntity>, int)> Query(long? agentRecordId, int? packingCategoryConfigId, string packingTitle, string provinceCode, string cityCode, string countyCode, bool? enabled, DateTime? createStartDate, DateTime? createEndDate, int pageIndex, int pageSize);

        /// <summary>
        /// 根据包装材料分类配置Id 获取包装材料配置记录
        /// </summary>
        /// <param name="packingCategoryConfigId">包装材料分类配置Id</param>
        /// <returns></returns>
        Task<PackingConfigOverwriteEntity> GetEntityByCategoryConfigId(int packingCategoryConfigId);

        /// <summary>
        /// 获取包装材料配置记录
        /// </summary>
        /// <param name="packingConfigOverwriteId">包装材料配置重写Id</param>
        /// <returns></returns>
        Task<PackingConfigOverwriteEntity> GetEntity(long packingConfigOverwriteId);

        /// <summary>
        /// 获取包装材料配置记录
        /// </summary>
        /// <param name="agentRecordId">代理商Id</param>
        /// <param name="packingConfigId">包装材料配置Id</param>
        /// <param name="provinceCode">省份Code</param>
        /// <param name="cityCode">市Code</param>
        /// <param name="countyCode">发货地县区Code</param>
        /// <returns></returns>
        Task<PackingConfigOverwriteEntity> GetEntity(long agentRecordId, long packingConfigId, string provinceCode, string cityCode, string countyCode);

        /// <summary>
        /// 添加包装材料配置记录
        /// </summary>
        /// <param name="entity">包装材料配置信息</param>
        /// <returns></returns>
        Task<PackingConfigOverwriteEntity> Insert(PackingConfigOverwriteEntity entity);

        /// <summary>
        /// 更新包装材料配置记录
        /// </summary>
        /// <param name="entity">包装材料配置信息</param>
        /// <returns></returns>
        Task<PackingConfigOverwriteEntity> Update(PackingConfigOverwriteEntity entity);

        /// <summary>
        /// 删除包装材料配置记录
        /// </summary>
        /// <param name="packingConfigOverwriteId">包装材料配置重写Id</param>
        /// <returns></returns>
        Task<int> Delete(int packingConfigOverwriteId);

        /// <summary>
        /// 获取包装材料配置记录列表
        /// </summary>
        /// <param name="agentRecordId">代理商Id</param>
        /// <param name="packingCategoryConfigId">包装材料分类配置Id</param>
        /// <param name="packingTitle">包装材料标题</param>
        /// <param name="enabled">是否启用</param>
        /// <param name="provinceCode">省份编码</param>
        /// <param name="cityCode">市编码</param>
        /// <param name="countyCode">区县编码</param>
        /// <returns></returns>
        Task<IEnumerable<PackingConfigOverwriteViewEntity>> GetList(long? agentRecordId, int? packingCategoryConfigId, string packingTitle, bool? enabled, string provinceCode, string cityCode, string countyCode);

        /// <summary>
        /// 根据包装材料配置Id获取一条包装材料配置记录记录
        /// </summary>
        /// <param name="packingConfigId">包装材料配置Id</param>
        /// <returns></returns>
        Task<PackingConfigOverwriteEntity> GetEntityByConfigId(int packingConfigId);
    }
}
